package com.example.flshtarvel.mapper;

import com.example.flshtarvel.entity.TagType;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface TagTypeMapper {
    @Select("select * from tag_type where tag_type_id=#{tagTypeId}")
    public TagType seleceTagTypeById(String tagTypeId);

    @Select("select * from tag_type where tag_type_name=#{tagTypeName}")
    public TagType selectTagTypeByName(String tagTypeName);

    @Select("select * from tag_type")
    public List<TagType> selectAllTagType();

    @Insert("insert into tag_type(tag_type_id,tag_type_name) value(#{tagTypeId},#{tagTypeName})")
    public int inserTagType(TagType tagType);
}
